package main

import (
	"fmt"
	"imooc-rabbitmq/RabbitMQ"
	"strconv"
	"time"
)

func main() {
	moocOne := RabbitMQ.NewRabbitMQRouting("exMooc", "mooc_one")
	moocTwo := RabbitMQ.NewRabbitMQRouting("exMooc", "mooc_two")
	for i := 0; i < 100; i++ {
		moocOne.PublishRouting("Hello mooc one!" + strconv.Itoa(i))
		moocTwo.PublishRouting("Hello mooc two!" + strconv.Itoa(i))
		time.Sleep(1 * time.Second)
		fmt.Println(i)
	}

}
